package com.ruyuan.eshop.construction.api;

import com.ruyuan.eshop.common.core.JsonResult;
import com.ruyuan.eshop.construction.domain.dto.ItemDetailDTO;
import com.ruyuan.eshop.construction.domain.dto.ProductDTO;
import com.ruyuan.eshop.construction.domain.dto.SaleSkuDTO;
import com.ruyuan.eshop.construction.domain.dto.SkuDetailDTO;
import com.ruyuan.eshop.construction.domain.dto.SkuPriceResultDTO;
import com.ruyuan.eshop.construction.domain.request.ProductRequest;
import com.ruyuan.eshop.construction.domain.request.QueryItemListRequest;
import com.ruyuan.eshop.construction.domain.request.QuerySaleSkuRequest;
import com.ruyuan.eshop.construction.domain.request.QuerySkuListRequest;
import com.ruyuan.eshop.construction.domain.request.SkuPriceRequest;

import java.util.List;

/**
 * 商品服务接口
 *
 * @author zhonghuashishan
 */
public interface ProductApi {

    /**
     * 建品/编辑商品接口
     *
     * @param request
     * @return com.ruyuan.eshop.common.core.JsonResult<com.ruyuan.eshop.construction.domain.dto.ProductDTO>
     * @author zhonghuashishan
     */
    JsonResult<ProductDTO> product(ProductRequest request);

    /**
     * 修改商品价格接口
     *
     * @param request
     * @return com.ruyuan.eshop.common.core.JsonResult<com.ruyuan.eshop.construction.domain.dto.SkuPriceResultDTO>
     * @author zhonghuashishan
     */
    JsonResult<SkuPriceResultDTO> updatePrice(SkuPriceRequest request);

    /**
     * 查询可售sku
     *
     * @param request
     * @return com.ruyuan.eshop.common.core.JsonResult<com.ruyuan.eshop.construction.domain.dto.SaleSkuDTO>
     * @author zhonghuashishan
     */
    JsonResult<SaleSkuDTO> getSaleSku(QuerySaleSkuRequest request);

    /**
     * 根据itemId查询item信息
     *
     * @param request
     * @return com.ruyuan.eshop.common.core.JsonResult<java.util.List<com.ruyuan.eshop.construction.domain.dto.ItemDetailDTO>>
     * @author zhonghuashishan
     */
    JsonResult<List<ItemDetailDTO>> listItems(QueryItemListRequest request);


    /**
     * 根据skuId查询sku信息
     *
     * @param request
     * @return com.ruyuan.eshop.common.core.JsonResult<java.util.List<com.ruyuan.eshop.construction.domain.dto.SkuDetailDTO>>
     * @author zhonghuashishan
     */
    JsonResult<List<SkuDetailDTO>> listSkus(QuerySkuListRequest request);
    
}
